import * as React from 'react';

import { StyleSheet, View, Text } from 'react-native';
import { AndroidSettings } from 'react-native-mobile-settings';

export default function App() {
  const test = () => {
    console.log('创建通知通道');
    AndroidSettings.createNotificationChannel({
      id: 'xRI2Id4S',
      name: '上课提醒',
      importance: AndroidSettings.IMPORTANCE_HIGH,
      description: '用于在前一天提醒同学第二天要上的课',
    });
  };

  return (
    <View style={styles.container}>
      <Text onPress={test} style={styles.content}>
        ClickTest
      </Text>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    alignItems: 'center',
    justifyContent: 'center',
  },
  content: {
    fontSize: 20,
    backgroundColor: 'red',
  },
});
